<?php
class Provider_File implements Provider_Interface
{
    private $url;
    
    public function __construct($link)
    {
        $this->url = Security::xss_clean($link);
    }
    
    public function get_info()
    {

         $embed_info_data = array('url' => $this->url);

         return (object) $embed_info_data;
                      
    }
    
    public function get_info_view($data)
    {
          $file_info_view = View::factory('embed_info/file', (array) $data);
          $output = array('url'    => $data->url,
                          'content' => $file_info_view->render());
          
          return $output;
    }
    
    public function get_embed_view($data)
    {
        $view_data = array('url' => $data->url);
        $file_embed_view = View::factory('embed_object/file', $view_data);
        
        return $file_embed_view->render();
    }
} 

?>